package com.ruoyi.web.controller.app;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.vo.business.ScriptRecordInfoVo;
import com.ruoyi.system.domain.vo.coopHan.PageScriptRecordVo;
import com.ruoyi.system.dto.coopHan.ScriptRecordDto;
import com.ruoyi.system.service.impl.ScriptRecordInfoServiceImpl;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 剧本备案信息管理 前端控制器
 * </p>
 *
 * @author yanfu
 * @since 2024-03-23
 */
@RestController
@RequestMapping("/app/script/record/info")
@RequiredArgsConstructor
@Api(tags = {"(app)剧本备案信息管理-公示"})
public class AppScriptRecordInfoController {

    private final ScriptRecordInfoServiceImpl scriptRecordInfoService;


    @PostMapping("/page")
    @ApiOperation(value = "剧本备案信息管理-公示列表")
    public AjaxResult<Page<PageScriptRecordVo>> scriptRecordPublicityInfo(@RequestBody ScriptRecordDto dto) {
        Page<PageScriptRecordVo> voPage = scriptRecordInfoService.scriptRecordPublicityInfo(dto);
        return AjaxResult.success(voPage);
    }

    @GetMapping("/detail")
    @ApiOperation(value = "剧本备案信息管理-公示详情")
    public AjaxResult<ScriptRecordInfoVo> getScriptRecordInfodetail(@RequestParam(value = "id", required = true) Long id) {
        ScriptRecordInfoVo vo = scriptRecordInfoService.getScriptRecordInfodetail(id);
        return AjaxResult.success(vo);
    }
}

